﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="userpower.aspx.cs" Inherits="UI.system.page.user.userpower" %>
<div style="margin: 15px;">
	<form id="userpower" class="layui-form" style="padding-left:0px;">
        <fieldset id="oa_power" class="layui-elem-field site-demo-button">
          <legend>日常OA</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="公告管理" value="notice-m" <%=power.Contains("notice-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="notice-a" <%=power.Contains("notice-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="notice-s" <%=power.Contains("notice-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="notice-u" <%=power.Contains("notice-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="notice-d" <%=power.Contains("notice-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="日志管理" value="daily-m" <%=power.Contains("daily-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="daily-a" <%=power.Contains("daily-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="daily-s" <%=power.Contains("daily-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="daily-u" <%=power.Contains("daily-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="daily-d" <%=power.Contains("daily-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="审批管理" value="examine-m" <%=power.Contains("examine-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="examine-a" <%=power.Contains("examine-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="examine-s" <%=power.Contains("examine-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="examine-u" <%=power.Contains("examine-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="examine-d" <%=power.Contains("examine-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="客户技术问题" value="bbs-m" <%=power.Contains("bbs-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="bbs-a" <%=power.Contains("bbs-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="bbs-s" <%=power.Contains("bbs-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="bbs-u" <%=power.Contains("bbs-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="bbs-d" <%=power.Contains("bbs-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="质量反馈" value="quality-m" <%=power.Contains("quality-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="quality-a" <%=power.Contains("quality-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="quality-s" <%=power.Contains("quality-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="quality-u" <%=power.Contains("quality-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="quality-d" <%=power.Contains("quality-d")?"checked":"" %>>
          </div>
          <%--
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="业务总结" value="business-m" <%=power.Contains("business-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="business-a" <%=power.Contains("business-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="business-s" <%=power.Contains("business-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="business-u" <%=power.Contains("business-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="business-d" <%=power.Contains("business-d")?"checked":"" %>>
          </div>
          --%>
        </fieldset>
        <fieldset id="customer_power" class="layui-elem-field site-demo-button">
          <legend>客户管理</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="我的客户" value="customer-m" <%=power.Contains("customer-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="customer-a" <%=power.Contains("customer-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="customer-s" <%=power.Contains("customer-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="customer-u" <%=power.Contains("customer-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="customer-d" <%=power.Contains("customer-d")?"checked":"" %>>
          </div>
        </fieldset>
        <fieldset id="order_power" class="layui-elem-field site-demo-button">
          <legend>订单管理</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="我的订单" value="order-m" <%=power.Contains("order-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="order-a" <%=power.Contains("order-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="查看" value="order-s" <%=power.Contains("order-s")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="order-u" <%=power.Contains("order-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="order-d" <%=power.Contains("order-d")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="审核" value="order-h" <%=power.Contains("order-h")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="发货" value="order-f" <%=power.Contains("order-f")?"checked":"" %>>
          </div>
        </fieldset>
        <fieldset id="product_power" class="layui-elem-field site-demo-button">
          <legend>产品管理</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="产品资料" value="product-m" <%=power.Contains("product-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="product-a" <%=power.Contains("product-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="提成点" value="product-t" <%=power.Contains("product-t")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="product-u" <%=power.Contains("product-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="product-d" <%=power.Contains("product-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="产品类别" value="producttype-m" <%=power.Contains("producttype-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="producttype-a" <%=power.Contains("producttype-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="producttype-u" <%=power.Contains("producttype-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="producttype-d" <%=power.Contains("producttype-d")?"checked":"" %>>
          </div>
        </fieldset>
        <fieldset id="finance_power" class="layui-elem-field site-demo-button">
          <legend>财务管理</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="客户回款" value="customerback-m" <%=power.Contains("customerback-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="customerback-a" <%=power.Contains("customerback-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="customerback-u" <%=power.Contains("customerback-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="customerback-d" <%=power.Contains("customerback-d")?"checked":"" %>>
          </div>
        </fieldset>
        <fieldset id="job_power" class="layui-elem-field site-demo-button">
          <legend>考核管理</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="我的考核" value="myassessment-m" <%=power.Contains("myassessment-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="myassessment-a" <%=power.Contains("myassessment-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="myassessment-u" <%=power.Contains("myassessment-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="myassessment-d" <%=power.Contains("myassessment-d")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="确定" value="myassessment-q" <%=power.Contains("myassessment-q")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="考核管理" value="assessment-m" <%=power.Contains("assessment-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="assessment-a" <%=power.Contains("assessment-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="assessment-u" <%=power.Contains("assessment-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="assessment-d" <%=power.Contains("assessment-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="岗位管理" value="job-m" <%=power.Contains("job-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="job-a" <%=power.Contains("job-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="考核项" value="job-k" <%=power.Contains("job-k")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="job-u" <%=power.Contains("job-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="job-d" <%=power.Contains("job-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="考核项管理" value="jobdetail-m" <%=power.Contains("jobdetail-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="jobdetail-a" <%=power.Contains("jobdetail-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="jobdetail-u" <%=power.Contains("jobdetail-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="jobdetail-d" <%=power.Contains("jobdetail-d")?"checked":"" %>>
          </div>
        </fieldset>
        <fieldset id="report_power" class="layui-elem-field site-demo-button">
          <legend>报表管理</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div style="height:60px; line-height:25px;">
                <input type="checkbox" name="power" lay-skin="primary" title="查看报表" value="report-m" <%=power.Contains("report-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="产品销量" value="report-u" <%=power.Contains("report-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="产品销售额" value="report-v" <%=power.Contains("report-v")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="客户销售额" value="report-w" <%=power.Contains("report-w")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="业务员客户量" value="report-x" <%=power.Contains("report-x")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="业务员销售额" value="report-y" <%=power.Contains("report-y")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="业务员回款额" value="report-z" <%=power.Contains("report-z")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="查看外勤" value="sign-m" <%=power.Contains("sign-m")?"checked":"" %>>
          </div>
        </fieldset>
        <fieldset id="set_power" class="layui-elem-field site-demo-button">
          <legend>系统管理</legend>
          <div>
                <input type="checkbox" name="allchoose" lay-filter="allchoose" lay-skin="primary" title="全选">
          </div>
          <div style="height:60px; line-height:25px;">
                <input type="checkbox" name="power" lay-skin="primary" title="账号管理" value="user-m" <%=power.Contains("user-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="user-a" <%=power.Contains("user-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="启用/禁用" value="user-j" <%=power.Contains("user-j")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="权限" value="user-q" <%=power.Contains("user-q")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="设置下级" value="user-l" <%=power.Contains("user-l")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="user-u" <%=power.Contains("user-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="user-d" <%=power.Contains("user-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="部门管理" value="depart-m" <%=power.Contains("depart-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="depart-a" <%=power.Contains("depart-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="depart-u" <%=power.Contains("depart-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="depart-d" <%=power.Contains("depart-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="客服管理" value="kf-m" <%=power.Contains("kf-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="kf-a" <%=power.Contains("kf-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="kf-u" <%=power.Contains("kf-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="kf-d" <%=power.Contains("kf-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="发货方式" value="sendtype-m" <%=power.Contains("sendtype-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="sendtype-a" <%=power.Contains("sendtype-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="sendtype-u" <%=power.Contains("sendtype-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="sendtype-d" <%=power.Contains("sendtype-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="付款方式" value="paytype-m" <%=power.Contains("paytype-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="paytype-a" <%=power.Contains("paytype-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="paytype-u" <%=power.Contains("paytype-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="paytype-d" <%=power.Contains("paytype-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="客户级别" value="grade-m" <%=power.Contains("grade-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="grade-a" <%=power.Contains("grade-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="grade-u" <%=power.Contains("grade-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="grade-d" <%=power.Contains("grade-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="审批类型" value="examinetype-m" <%=power.Contains("examinetype-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="examinetype-a" <%=power.Contains("examinetype-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="examinetype-u" <%=power.Contains("examinetype-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="examinetype-d" <%=power.Contains("examinetype-d")?"checked":"" %>>
          </div>
          <div>
                <input type="checkbox" name="power" lay-skin="primary" title="产品单位" value="productunit-m" <%=power.Contains("productunit-m")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="新增" value="productunit-a" <%=power.Contains("productunit-a")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="编辑" value="productunit-u" <%=power.Contains("productunit-u")?"checked":"" %>>
                <input type="checkbox" name="power" lay-skin="primary" title="删除" value="productunit-d" <%=power.Contains("productunit-d")?"checked":"" %>>
          </div>
        </fieldset>
		<a lay-filter="save" lay-submit style="display: none;"></a>
	</form>
</div>
<script>
    form.on('checkbox(allchoose)', function (data) {
        var child = $(data.elem).parent().parent().find('input[type="checkbox"]');
        child.each(function (index, item) {
            item.checked = data.elem.checked;
        });
        form.render('checkbox');
    });
</script>